<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="X-UA-Compatible" content="chrome=1;IE=edge">
    <meta name="viewport" content="user-scalable=no">
    <link rel="stylesheet" href="../../../railView/css/railbox.css" type="text/css" />
    <link rel="stylesheet" href="../css/railView.css" type="text/css" />
    <script type="text/javascript" src="../../../railView/js/railbox-2.0.0.js" charset="utf-8"></script>
    <script type="text/javascript" src="../js/UUID.js"></script>
    <!--需要使用initControlModelTreeButton方法时才引入modelTree.js和jquery-2.1.4.min.js-->
    <script type="text/javascript" src="../../../railView/libs/jquery-2.1.4.min.js"></script>
    <script type="text/javascript" src="../../../railView/libs/modelTree.js"></script>
    
</head>
<body>
    <div id="left" style="width: 100%; height: 100%; position: relative; float: left;"></div>
    <script id="viewerStartup">
        var sheetViewer, modelViewer;
        window.onload = function () {
          // 初始化图纸
          var proleft = new CarsView("left", 'csr', exampleModelId, callbackleft, {
            isShowAxis: true,
            modelServiceUrl: "http://183.56.197.146:11182",
          });
          proleft.then(function (value) {
            sheetViewer = value;
            sheetViewer.assemblyModels(0, [planModelId]).forEach(item => {
                // 每个item为一个promise
                item.then(res => {
                    // 每个promise解析后的值为当前装配模型的根节点id
                    console.log(res, '每个promise解析后的值为当前装配模型的根节点id')
                    sheetViewer.setView('top');
                })
            });
            sheetViewer.initControlModelTreeButton()
          });
        };

        function callbackleft(nodeNames, nodeIds, position, center, normal) {}
      </script>
</body>
</html>
